<template>
  <el-dialog append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" :title="crud.status.title" width="700px">
    <el-form ref="form" :model="form" :rules="rules" size="small" label-width="120px">
      <el-form-item label="appId">
        <el-input v-model="form.appId" />
      </el-form-item>
      <el-form-item label="app_secret">
        <el-input v-model="form.appSecret" />
      </el-form-item>
      <el-form-item label="aes_key">
        <el-input v-model="form.aesKey" />
      </el-form-item>
      <el-form-item label="access_token">
        <el-input v-model="form.accessToken" />
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="text" @click="crud.cancelCU">取消</el-button>
      <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { form } from '@crud/crud'

const defaultForm = { id: null, appId: null, appSecret: null, aesKey: null, accessToken: null }
export default {
  mixins: [form(defaultForm)],
  data() {
    return {
      rules: {
      }
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  /deep/ .el-input-number .el-input__inner {
    text-align: left;
  }
</style>
